{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "39f7a811",
   "metadata": {},
   "source": [
    "# 作业\n",
    "> 1. 尝试搜索POI2.0 接口\n",
    "> 2. 获取中餐厅、西餐厅、快餐厅的信息(图片、内容等)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "94ea373d",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1. 尝试搜索POI2.0 接口"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "d223487b",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1. 调用requests模块\n",
    "import requests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "52ad839d",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2. 请求方法：GET\n",
    "# 3. 请求的搜索POI2.0地址：https://restapi.amap.com/v5/place/text?parameters\n",
    "POI2_url = \"https://restapi.amap.com/v5/place/text?parameters\"\n",
    "\n",
    "# 4. 请求的参数（payload）\n",
    "payload = {\n",
    "    \"key\":\"751cc256307b680656dd4f76d950ab80\",\n",
    "    \"keywords\":\"广东省广州市从化区温泉镇温泉大道882号\"\n",
    "}\n",
    "\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=POI2_url, params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "d0ad25c2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "8832f7d0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'name': '广州南方学院(东南门)',\n",
       "   'id': 'B0FFK8J7XY',\n",
       "   'location': '113.678689,23.628304',\n",
       "   'type': '通行设施;临街院门;临街院门',\n",
       "   'typecode': '991400',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇温泉大道882号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117'},\n",
       "  {'name': '广州中大南方招待所',\n",
       "   'id': 'B0FFH6K3U9',\n",
       "   'location': '113.676330,23.631332',\n",
       "   'type': '住宿服务;住宿服务相关;住宿服务相关',\n",
       "   'typecode': '100000',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇温泉大道882号广州南方学院H7栋1-5层',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117'},\n",
       "  {'name': '温泉大道',\n",
       "   'id': 'B0FFH6IN5S',\n",
       "   'location': '113.647578,23.623100',\n",
       "   'type': '地名地址信息;交通地名;道路名',\n",
       "   'typecode': '190301',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '从化区',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117'},\n",
       "  {'name': '广州南方学院新综合楼-停车处',\n",
       "   'id': 'B0H3T7K00K',\n",
       "   'location': '113.679946,23.631777',\n",
       "   'type': '交通设施服务;停车场;停车场相关',\n",
       "   'typecode': '150900',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇温泉大道882号广州南方学院内',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117'},\n",
       "  {'name': '西学楼11号',\n",
       "   'id': 'B0FFKPXX9K',\n",
       "   'location': '113.677578,23.628571',\n",
       "   'type': '地名地址信息;门牌信息;楼栋号',\n",
       "   'typecode': '190403',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉大道882号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117'},\n",
       "  {'name': '西学楼6号',\n",
       "   'id': 'B0FFHSS3BV',\n",
       "   'location': '113.676631,23.630848',\n",
       "   'type': '地名地址信息;门牌信息;楼栋号',\n",
       "   'typecode': '190403',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉大道882号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117'},\n",
       "  {'name': '中山大学南方学院东学楼24号楼',\n",
       "   'id': 'B0HKCD9QBA',\n",
       "   'location': '113.683682,23.632140',\n",
       "   'type': '地名地址信息;门牌信息;楼栋号',\n",
       "   'typecode': '190403',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇温泉大道882号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117'},\n",
       "  {'name': '广州从化温泉大道358号',\n",
       "   'id': 'B0FFKLPJHE',\n",
       "   'location': '113.629516,23.603292',\n",
       "   'type': '商务住宅;商务住宅相关;商务住宅相关',\n",
       "   'typecode': '120000',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉大道与566乡道交叉口东北150米',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117'},\n",
       "  {'name': '趣浪温泉客栈',\n",
       "   'id': 'B0FFLJRI4U',\n",
       "   'location': '113.630153,23.605227',\n",
       "   'type': '住宿服务;旅馆招待所;旅馆招待所',\n",
       "   'typecode': '100200',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉大道382号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117'},\n",
       "  {'name': '温泉司法所',\n",
       "   'id': 'B00141U4US',\n",
       "   'location': '113.631880,23.616829',\n",
       "   'type': '政府机构及社会团体;公检法机构;公检法机关',\n",
       "   'typecode': '130500',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉大道383号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117'}],\n",
       " 'count': '10'}"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "5bf6ebea",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2.获取中餐厅、西餐厅、快餐厅的信息(图片、内容等)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "11b3e16e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2. 请求方法：GET\n",
    "# 3. 请求的搜索POI2.0地址：https://restapi.amap.com/v5/place/around?parameters\n",
    "POI2_url = \"https://restapi.amap.com/v5/place/around?parameters\"\n",
    "\n",
    "# 4. 请求的参数（payload）\n",
    "payload = {\n",
    "    \"key\":\"751cc256307b680656dd4f76d950ab80\",\n",
    "    \"keywords\":\"中餐厅\",\n",
    "    \"location\":\"113.678280,23.628439\",\n",
    "    \"show_fields\":\"photos,business\"\n",
    "}\n",
    "\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=POI2_url, params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "6f372a85",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "f7e053c8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'name': '喜洋洋烧烤城',\n",
       "   'id': 'B0FFKT56Q8',\n",
       "   'location': '113.678474,23.628422',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '博学路6号(广州南方学院南门口旁)',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '烤串', 'keytag': '烤串'}},\n",
       "  {'name': '港式住家饭(中大店)',\n",
       "   'id': 'B0H1M90UGD',\n",
       "   'location': '113.679504,23.628108',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇中山大学南方学院',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '香港菜', 'keytag': '香港菜'}},\n",
       "  {'name': '找餐时间(轻食店)',\n",
       "   'id': 'B0H31YY48Q',\n",
       "   'location': '113.679695,23.628204',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇中大南方',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '中餐', 'keytag': '中餐'}},\n",
       "  {'name': '巴老冒豆花冒菜(中大店)',\n",
       "   'id': 'B0HROCISXU',\n",
       "   'location': '113.679739,23.628221',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇中大南方',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '冒菜', 'keytag': '冒菜'}},\n",
       "  {'name': '牛哥烧烤',\n",
       "   'id': 'B0HROCM3MH',\n",
       "   'location': '113.679809,23.628326',\n",
       "   'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "   'typecode': '050118',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇中山大学南方学院',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '烤串', 'keytag': '烤串'}},\n",
       "  {'name': '桃缘瓦舍',\n",
       "   'id': 'B0IGC5BQCT',\n",
       "   'location': '113.680297,23.627788',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇平岗村乌土平岗街29号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '中餐', 'keytag': '中餐', 'rating': '2.6'}},\n",
       "  {'name': '歡喜烤鱼饭',\n",
       "   'id': 'B0HROCIT9Q',\n",
       "   'location': '113.680349,23.627573',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '乌土村中南公寓',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '烤鱼', 'keytag': '烤鱼'}},\n",
       "  {'name': '99BARBECUE烤吧(中大店)',\n",
       "   'id': 'B0HROCMIX1',\n",
       "   'location': '113.680449,23.629268',\n",
       "   'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "   'typecode': '050118',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '中大南方学院后门',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '烧烤', 'keytag': '烧烤', 'rating': '2.7'}},\n",
       "  {'name': '湖边纸包鱼',\n",
       "   'id': 'B0FFL7NUA2',\n",
       "   'location': '113.679861,23.630285',\n",
       "   'type': '餐饮服务;中餐厅;四川菜(川菜)',\n",
       "   'typecode': '050102',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '广州南方学院',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'tel': '13924024938',\n",
       "    'rectag': '川菜',\n",
       "    'keytag': '川菜',\n",
       "    'rating': '4.5',\n",
       "    'opentime_today': '09:00-23:00',\n",
       "    'opentime_week': '09:00-23:00'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/20080ba9f6fcd2808d64ce149b517ca9'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9f40694ca108a175d36847d03ecf4ec0'},\n",
       "    {'title': '',\n",
       "     'url': 'https://img.alicdn.com/imgextra/i2/3695320962/O1CN01JFnmLv1IydhNhdLT4_!!3695320962-0-kbcontentapng.jpg'}]},\n",
       "  {'name': '壹休盖饭',\n",
       "   'id': 'B0HRHG0RSP',\n",
       "   'location': '113.679611,23.630517',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇乌土村上围2队13号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '盖饭', 'keytag': '盖饭'}}],\n",
       " 'count': '10'}"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "6d0e84cc",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "88601235",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>id</th>\n",
       "      <th>location</th>\n",
       "      <th>type</th>\n",
       "      <th>typecode</th>\n",
       "      <th>pname</th>\n",
       "      <th>cityname</th>\n",
       "      <th>adname</th>\n",
       "      <th>address</th>\n",
       "      <th>pcode</th>\n",
       "      <th>citycode</th>\n",
       "      <th>adcode</th>\n",
       "      <th>business.rectag</th>\n",
       "      <th>business.keytag</th>\n",
       "      <th>business.rating</th>\n",
       "      <th>photos</th>\n",
       "      <th>business.tel</th>\n",
       "      <th>business.opentime_today</th>\n",
       "      <th>business.opentime_week</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>喜洋洋烧烤城</td>\n",
       "      <td>B0FFKT56Q8</td>\n",
       "      <td>113.678474,23.628422</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>博学路6号(广州南方学院南门口旁)</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>烤串</td>\n",
       "      <td>烤串</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>港式住家饭(中大店)</td>\n",
       "      <td>B0H1M90UGD</td>\n",
       "      <td>113.679504,23.628108</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇中山大学南方学院</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>香港菜</td>\n",
       "      <td>香港菜</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>找餐时间(轻食店)</td>\n",
       "      <td>B0H31YY48Q</td>\n",
       "      <td>113.679695,23.628204</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇中大南方</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>中餐</td>\n",
       "      <td>中餐</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>巴老冒豆花冒菜(中大店)</td>\n",
       "      <td>B0HROCISXU</td>\n",
       "      <td>113.679739,23.628221</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇中大南方</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>冒菜</td>\n",
       "      <td>冒菜</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>牛哥烧烤</td>\n",
       "      <td>B0HROCM3MH</td>\n",
       "      <td>113.679809,23.628326</td>\n",
       "      <td>餐饮服务;中餐厅;特色/地方风味餐厅</td>\n",
       "      <td>050118</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇中山大学南方学院</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>烤串</td>\n",
       "      <td>烤串</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>桃缘瓦舍</td>\n",
       "      <td>B0IGC5BQCT</td>\n",
       "      <td>113.680297,23.627788</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇平岗村乌土平岗街29号</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>中餐</td>\n",
       "      <td>中餐</td>\n",
       "      <td>2.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>歡喜烤鱼饭</td>\n",
       "      <td>B0HROCIT9Q</td>\n",
       "      <td>113.680349,23.627573</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>乌土村中南公寓</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>烤鱼</td>\n",
       "      <td>烤鱼</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>99BARBECUE烤吧(中大店)</td>\n",
       "      <td>B0HROCMIX1</td>\n",
       "      <td>113.680449,23.629268</td>\n",
       "      <td>餐饮服务;中餐厅;特色/地方风味餐厅</td>\n",
       "      <td>050118</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>中大南方学院后门</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>烧烤</td>\n",
       "      <td>烧烤</td>\n",
       "      <td>2.7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>湖边纸包鱼</td>\n",
       "      <td>B0FFL7NUA2</td>\n",
       "      <td>113.679861,23.630285</td>\n",
       "      <td>餐饮服务;中餐厅;四川菜(川菜)</td>\n",
       "      <td>050102</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>广州南方学院</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>川菜</td>\n",
       "      <td>川菜</td>\n",
       "      <td>4.5</td>\n",
       "      <td>[{'title': '', 'url': 'http://store.is.autonav...</td>\n",
       "      <td>13924024938</td>\n",
       "      <td>09:00-23:00</td>\n",
       "      <td>09:00-23:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>壹休盖饭</td>\n",
       "      <td>B0HRHG0RSP</td>\n",
       "      <td>113.679611,23.630517</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇乌土村上围2队13号</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>盖饭</td>\n",
       "      <td>盖饭</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                name          id              location                type  \\\n",
       "0             喜洋洋烧烤城  B0FFKT56Q8  113.678474,23.628422        餐饮服务;中餐厅;中餐厅   \n",
       "1         港式住家饭(中大店)  B0H1M90UGD  113.679504,23.628108        餐饮服务;中餐厅;中餐厅   \n",
       "2          找餐时间(轻食店)  B0H31YY48Q  113.679695,23.628204        餐饮服务;中餐厅;中餐厅   \n",
       "3       巴老冒豆花冒菜(中大店)  B0HROCISXU  113.679739,23.628221        餐饮服务;中餐厅;中餐厅   \n",
       "4               牛哥烧烤  B0HROCM3MH  113.679809,23.628326  餐饮服务;中餐厅;特色/地方风味餐厅   \n",
       "5               桃缘瓦舍  B0IGC5BQCT  113.680297,23.627788        餐饮服务;中餐厅;中餐厅   \n",
       "6              歡喜烤鱼饭  B0HROCIT9Q  113.680349,23.627573        餐饮服务;中餐厅;中餐厅   \n",
       "7  99BARBECUE烤吧(中大店)  B0HROCMIX1  113.680449,23.629268  餐饮服务;中餐厅;特色/地方风味餐厅   \n",
       "8              湖边纸包鱼  B0FFL7NUA2  113.679861,23.630285    餐饮服务;中餐厅;四川菜(川菜)   \n",
       "9               壹休盖饭  B0HRHG0RSP  113.679611,23.630517        餐饮服务;中餐厅;中餐厅   \n",
       "\n",
       "  typecode pname cityname adname            address   pcode citycode  adcode  \\\n",
       "0   050100   广东省      广州市    从化区  博学路6号(广州南方学院南门口旁)  440000      020  440117   \n",
       "1   050100   广东省      广州市    从化区        温泉镇中山大学南方学院  440000      020  440117   \n",
       "2   050100   广东省      广州市    从化区            温泉镇中大南方  440000      020  440117   \n",
       "3   050100   广东省      广州市    从化区            温泉镇中大南方  440000      020  440117   \n",
       "4   050118   广东省      广州市    从化区        温泉镇中山大学南方学院  440000      020  440117   \n",
       "5   050100   广东省      广州市    从化区     温泉镇平岗村乌土平岗街29号  440000      020  440117   \n",
       "6   050100   广东省      广州市    从化区            乌土村中南公寓  440000      020  440117   \n",
       "7   050118   广东省      广州市    从化区           中大南方学院后门  440000      020  440117   \n",
       "8   050102   广东省      广州市    从化区             广州南方学院  440000      020  440117   \n",
       "9   050100   广东省      广州市    从化区      温泉镇乌土村上围2队13号  440000      020  440117   \n",
       "\n",
       "  business.rectag business.keytag business.rating  \\\n",
       "0              烤串              烤串             NaN   \n",
       "1             香港菜             香港菜             NaN   \n",
       "2              中餐              中餐             NaN   \n",
       "3              冒菜              冒菜             NaN   \n",
       "4              烤串              烤串             NaN   \n",
       "5              中餐              中餐             2.6   \n",
       "6              烤鱼              烤鱼             NaN   \n",
       "7              烧烤              烧烤             2.7   \n",
       "8              川菜              川菜             4.5   \n",
       "9              盖饭              盖饭             NaN   \n",
       "\n",
       "                                              photos business.tel  \\\n",
       "0                                                NaN          NaN   \n",
       "1                                                NaN          NaN   \n",
       "2                                                NaN          NaN   \n",
       "3                                                NaN          NaN   \n",
       "4                                                NaN          NaN   \n",
       "5                                                NaN          NaN   \n",
       "6                                                NaN          NaN   \n",
       "7                                                NaN          NaN   \n",
       "8  [{'title': '', 'url': 'http://store.is.autonav...  13924024938   \n",
       "9                                                NaN          NaN   \n",
       "\n",
       "  business.opentime_today business.opentime_week  \n",
       "0                     NaN                    NaN  \n",
       "1                     NaN                    NaN  \n",
       "2                     NaN                    NaN  \n",
       "3                     NaN                    NaN  \n",
       "4                     NaN                    NaN  \n",
       "5                     NaN                    NaN  \n",
       "6                     NaN                    NaN  \n",
       "7                     NaN                    NaN  \n",
       "8             09:00-23:00            09:00-23:00  \n",
       "9                     NaN                    NaN  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['pois'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "0ba4a035",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2. 请求方法：GET\n",
    "# 3. 请求的搜索POI2.0地址：https://restapi.amap.com/v5/place/around?parameters\n",
    "POI2_url = \"https://restapi.amap.com/v5/place/around?parameters\"\n",
    "\n",
    "# 4. 请求的参数（payload）\n",
    "payload = {\n",
    "    \"key\":\"751cc256307b680656dd4f76d950ab80\",\n",
    "    \"keywords\":\"西餐厅\",\n",
    "    \"location\":\"113.678280,23.628439\",\n",
    "    \"show_fields\":\"photos,business\"\n",
    "}\n",
    "\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=POI2_url, params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "d5c5b9da",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "c300e32a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'name': 'Uni-hotel西餐',\n",
       "   'id': 'B0GR3OMDZ2',\n",
       "   'location': '113.679222,23.632671',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050201',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉区广州南方学院',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '西餐', 'keytag': '西餐'}},\n",
       "  {'name': '米斯特比萨',\n",
       "   'id': 'B0FFKT17JQ',\n",
       "   'location': '113.698059,23.611033',\n",
       "   'type': '餐饮服务;外国餐厅;外国餐厅',\n",
       "   'typecode': '050200',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇石坑村东儒队00762号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'tel': '13533792521', 'rectag': '披萨', 'keytag': '披萨'}},\n",
       "  {'name': '快乐星汉堡',\n",
       "   'id': 'B0FFIN70CR',\n",
       "   'location': '113.670232,23.603146',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050201',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '桃园东路与新教路交叉口东北40米',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '西式快餐', 'keytag': '西式快餐'}},\n",
       "  {'name': '碧泉空中温泉酒店西餐厅',\n",
       "   'id': 'B0FFHE6NL2',\n",
       "   'location': '113.654605,23.646045',\n",
       "   'type': '餐饮服务;外国餐厅;外国餐厅',\n",
       "   'typecode': '050200',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉东路76号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'business_area': '温泉',\n",
       "    'rectag': '西餐',\n",
       "    'keytag': '西餐',\n",
       "    'rating': '4.1',\n",
       "    'cost': '145.00'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a01f74db4bd9a02e38c932c34a88c604'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/c729fe864c7706726301e8a703425899'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/c85d4fca3d0c605817d1000aefa9dee0'}]},\n",
       "  {'name': '飘香扒房(三饭三楼店)',\n",
       "   'id': 'B0HROCLI4W',\n",
       "   'location': '113.614664,23.581619',\n",
       "   'type': '餐饮服务;外国餐厅;牛扒店(扒房)',\n",
       "   'typecode': '050211',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '环市东路1123号梅花园',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '牛排', 'keytag': '牛排', 'rating': '2.6'}},\n",
       "  {'name': '都喜泰丽温泉度假酒店泰丽西餐厅',\n",
       "   'id': 'B0FFFZX3VN',\n",
       "   'location': '113.716006,23.695553',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050201',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '御泉大道352号从化都喜泰丽温泉度假酒店餐饮中心1层',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'tel': '020-37988888',\n",
       "    'rectag': '泰国菜',\n",
       "    'keytag': '泰国菜',\n",
       "    'rating': '4.3',\n",
       "    'cost': '217.00'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0ba1ebb9550b95a15e6024981f8cf40a'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1072362e4f09e0989140c5eba9199890'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/37a73fd184e9a0cda01616f1ef9c2736'}]},\n",
       "  {'name': '唐凰音乐主题餐吧',\n",
       "   'id': 'B0IG7KM4X0',\n",
       "   'location': '113.618768,23.559583',\n",
       "   'type': '餐饮服务;外国餐厅;外国餐厅',\n",
       "   'typecode': '050200',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '灌村路与环市东路交叉口东南60米',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '音乐餐厅', 'keytag': '音乐餐厅'}},\n",
       "  {'name': '白水寨嘉华酒店峰景西餐厅',\n",
       "   'id': 'B0FFI1WX57',\n",
       "   'location': '113.769390,23.556179',\n",
       "   'type': '餐饮服务;外国餐厅;外国餐厅',\n",
       "   'typecode': '050200',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '增城区',\n",
       "   'address': '白水寨嘉华温泉酒店内',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440118',\n",
       "   'business': {'tel': '020-82822226;020-82826888',\n",
       "    'rectag': '西餐',\n",
       "    'keytag': '西餐',\n",
       "    'rating': '4.1',\n",
       "    'cost': '163.00',\n",
       "    'opentime_today': '11:00-24:00',\n",
       "    'opentime_week': '全年11:00-24:00'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/03e1fa984d1828b736495ca4fe884bee'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1549bd74cb1db96a1c51602a619d87ce'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1848831b07e3180020d992c452967139'}]},\n",
       "  {'name': '卡哇谊西餐厅(新城东路店)',\n",
       "   'id': 'B0FFH83K97',\n",
       "   'location': '113.590408,23.546459',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050201',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '新城东路25号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'business_area': '街口',\n",
       "    'tel': '020-87948399;13533993278',\n",
       "    'rectag': '西餐',\n",
       "    'keytag': '西餐',\n",
       "    'rating': '4.3',\n",
       "    'cost': '35.00',\n",
       "    'opentime_today': '10:00-24:00',\n",
       "    'opentime_week': '10:00-24:00'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/beecfa910590d7293df8a922fc0e0701'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/965bbca458ba637919faaca0cc458841'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0498dcac19b900fe676ebf21f471ed86'}]},\n",
       "  {'name': '品爵西餐厅',\n",
       "   'id': 'B0HRMSIB3H',\n",
       "   'location': '113.590299,23.546525',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050201',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '新城东路与新城东路二巷交叉口西北60米',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'business_area': '街口', 'rectag': '西餐', 'keytag': '西餐'}}],\n",
       " 'count': '10'}"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "33c5e512",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>id</th>\n",
       "      <th>location</th>\n",
       "      <th>type</th>\n",
       "      <th>typecode</th>\n",
       "      <th>pname</th>\n",
       "      <th>cityname</th>\n",
       "      <th>adname</th>\n",
       "      <th>address</th>\n",
       "      <th>pcode</th>\n",
       "      <th>...</th>\n",
       "      <th>adcode</th>\n",
       "      <th>business.rectag</th>\n",
       "      <th>business.keytag</th>\n",
       "      <th>business.tel</th>\n",
       "      <th>photos</th>\n",
       "      <th>business.business_area</th>\n",
       "      <th>business.rating</th>\n",
       "      <th>business.cost</th>\n",
       "      <th>business.opentime_today</th>\n",
       "      <th>business.opentime_week</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Uni-hotel西餐</td>\n",
       "      <td>B0GR3OMDZ2</td>\n",
       "      <td>113.679222,23.632671</td>\n",
       "      <td>餐饮服务;外国餐厅;西餐厅(综合风味)</td>\n",
       "      <td>050201</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉区广州南方学院</td>\n",
       "      <td>440000</td>\n",
       "      <td>...</td>\n",
       "      <td>440117</td>\n",
       "      <td>西餐</td>\n",
       "      <td>西餐</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>米斯特比萨</td>\n",
       "      <td>B0FFKT17JQ</td>\n",
       "      <td>113.698059,23.611033</td>\n",
       "      <td>餐饮服务;外国餐厅;外国餐厅</td>\n",
       "      <td>050200</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇石坑村东儒队00762号</td>\n",
       "      <td>440000</td>\n",
       "      <td>...</td>\n",
       "      <td>440117</td>\n",
       "      <td>披萨</td>\n",
       "      <td>披萨</td>\n",
       "      <td>13533792521</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>快乐星汉堡</td>\n",
       "      <td>B0FFIN70CR</td>\n",
       "      <td>113.670232,23.603146</td>\n",
       "      <td>餐饮服务;外国餐厅;西餐厅(综合风味)</td>\n",
       "      <td>050201</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>桃园东路与新教路交叉口东北40米</td>\n",
       "      <td>440000</td>\n",
       "      <td>...</td>\n",
       "      <td>440117</td>\n",
       "      <td>西式快餐</td>\n",
       "      <td>西式快餐</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>碧泉空中温泉酒店西餐厅</td>\n",
       "      <td>B0FFHE6NL2</td>\n",
       "      <td>113.654605,23.646045</td>\n",
       "      <td>餐饮服务;外国餐厅;外国餐厅</td>\n",
       "      <td>050200</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉东路76号</td>\n",
       "      <td>440000</td>\n",
       "      <td>...</td>\n",
       "      <td>440117</td>\n",
       "      <td>西餐</td>\n",
       "      <td>西餐</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[{'title': '', 'url': 'http://store.is.autonav...</td>\n",
       "      <td>温泉</td>\n",
       "      <td>4.1</td>\n",
       "      <td>145.00</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>飘香扒房(三饭三楼店)</td>\n",
       "      <td>B0HROCLI4W</td>\n",
       "      <td>113.614664,23.581619</td>\n",
       "      <td>餐饮服务;外国餐厅;牛扒店(扒房)</td>\n",
       "      <td>050211</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>环市东路1123号梅花园</td>\n",
       "      <td>440000</td>\n",
       "      <td>...</td>\n",
       "      <td>440117</td>\n",
       "      <td>牛排</td>\n",
       "      <td>牛排</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>都喜泰丽温泉度假酒店泰丽西餐厅</td>\n",
       "      <td>B0FFFZX3VN</td>\n",
       "      <td>113.716006,23.695553</td>\n",
       "      <td>餐饮服务;外国餐厅;西餐厅(综合风味)</td>\n",
       "      <td>050201</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>御泉大道352号从化都喜泰丽温泉度假酒店餐饮中心1层</td>\n",
       "      <td>440000</td>\n",
       "      <td>...</td>\n",
       "      <td>440117</td>\n",
       "      <td>泰国菜</td>\n",
       "      <td>泰国菜</td>\n",
       "      <td>020-37988888</td>\n",
       "      <td>[{'title': '', 'url': 'http://store.is.autonav...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.3</td>\n",
       "      <td>217.00</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>唐凰音乐主题餐吧</td>\n",
       "      <td>B0IG7KM4X0</td>\n",
       "      <td>113.618768,23.559583</td>\n",
       "      <td>餐饮服务;外国餐厅;外国餐厅</td>\n",
       "      <td>050200</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>灌村路与环市东路交叉口东南60米</td>\n",
       "      <td>440000</td>\n",
       "      <td>...</td>\n",
       "      <td>440117</td>\n",
       "      <td>音乐餐厅</td>\n",
       "      <td>音乐餐厅</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>白水寨嘉华酒店峰景西餐厅</td>\n",
       "      <td>B0FFI1WX57</td>\n",
       "      <td>113.769390,23.556179</td>\n",
       "      <td>餐饮服务;外国餐厅;外国餐厅</td>\n",
       "      <td>050200</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>增城区</td>\n",
       "      <td>白水寨嘉华温泉酒店内</td>\n",
       "      <td>440000</td>\n",
       "      <td>...</td>\n",
       "      <td>440118</td>\n",
       "      <td>西餐</td>\n",
       "      <td>西餐</td>\n",
       "      <td>020-82822226;020-82826888</td>\n",
       "      <td>[{'title': '', 'url': 'http://store.is.autonav...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.1</td>\n",
       "      <td>163.00</td>\n",
       "      <td>11:00-24:00</td>\n",
       "      <td>全年11:00-24:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>卡哇谊西餐厅(新城东路店)</td>\n",
       "      <td>B0FFH83K97</td>\n",
       "      <td>113.590408,23.546459</td>\n",
       "      <td>餐饮服务;外国餐厅;西餐厅(综合风味)</td>\n",
       "      <td>050201</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>新城东路25号</td>\n",
       "      <td>440000</td>\n",
       "      <td>...</td>\n",
       "      <td>440117</td>\n",
       "      <td>西餐</td>\n",
       "      <td>西餐</td>\n",
       "      <td>020-87948399;13533993278</td>\n",
       "      <td>[{'title': '', 'url': 'http://store.is.autonav...</td>\n",
       "      <td>街口</td>\n",
       "      <td>4.3</td>\n",
       "      <td>35.00</td>\n",
       "      <td>10:00-24:00</td>\n",
       "      <td>10:00-24:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>品爵西餐厅</td>\n",
       "      <td>B0HRMSIB3H</td>\n",
       "      <td>113.590299,23.546525</td>\n",
       "      <td>餐饮服务;外国餐厅;西餐厅(综合风味)</td>\n",
       "      <td>050201</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>新城东路与新城东路二巷交叉口西北60米</td>\n",
       "      <td>440000</td>\n",
       "      <td>...</td>\n",
       "      <td>440117</td>\n",
       "      <td>西餐</td>\n",
       "      <td>西餐</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>街口</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>10 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "              name          id              location                 type  \\\n",
       "0      Uni-hotel西餐  B0GR3OMDZ2  113.679222,23.632671  餐饮服务;外国餐厅;西餐厅(综合风味)   \n",
       "1            米斯特比萨  B0FFKT17JQ  113.698059,23.611033       餐饮服务;外国餐厅;外国餐厅   \n",
       "2            快乐星汉堡  B0FFIN70CR  113.670232,23.603146  餐饮服务;外国餐厅;西餐厅(综合风味)   \n",
       "3      碧泉空中温泉酒店西餐厅  B0FFHE6NL2  113.654605,23.646045       餐饮服务;外国餐厅;外国餐厅   \n",
       "4      飘香扒房(三饭三楼店)  B0HROCLI4W  113.614664,23.581619    餐饮服务;外国餐厅;牛扒店(扒房)   \n",
       "5  都喜泰丽温泉度假酒店泰丽西餐厅  B0FFFZX3VN  113.716006,23.695553  餐饮服务;外国餐厅;西餐厅(综合风味)   \n",
       "6         唐凰音乐主题餐吧  B0IG7KM4X0  113.618768,23.559583       餐饮服务;外国餐厅;外国餐厅   \n",
       "7     白水寨嘉华酒店峰景西餐厅  B0FFI1WX57  113.769390,23.556179       餐饮服务;外国餐厅;外国餐厅   \n",
       "8    卡哇谊西餐厅(新城东路店)  B0FFH83K97  113.590408,23.546459  餐饮服务;外国餐厅;西餐厅(综合风味)   \n",
       "9            品爵西餐厅  B0HRMSIB3H  113.590299,23.546525  餐饮服务;外国餐厅;西餐厅(综合风味)   \n",
       "\n",
       "  typecode pname cityname adname                     address   pcode  ...  \\\n",
       "0   050201   广东省      广州市    从化区                   温泉区广州南方学院  440000  ...   \n",
       "1   050200   广东省      广州市    从化区             温泉镇石坑村东儒队00762号  440000  ...   \n",
       "2   050201   广东省      广州市    从化区            桃园东路与新教路交叉口东北40米  440000  ...   \n",
       "3   050200   广东省      广州市    从化区                     温泉东路76号  440000  ...   \n",
       "4   050211   广东省      广州市    从化区                环市东路1123号梅花园  440000  ...   \n",
       "5   050201   广东省      广州市    从化区  御泉大道352号从化都喜泰丽温泉度假酒店餐饮中心1层  440000  ...   \n",
       "6   050200   广东省      广州市    从化区            灌村路与环市东路交叉口东南60米  440000  ...   \n",
       "7   050200   广东省      广州市    增城区                  白水寨嘉华温泉酒店内  440000  ...   \n",
       "8   050201   广东省      广州市    从化区                     新城东路25号  440000  ...   \n",
       "9   050201   广东省      广州市    从化区         新城东路与新城东路二巷交叉口西北60米  440000  ...   \n",
       "\n",
       "   adcode business.rectag business.keytag               business.tel  \\\n",
       "0  440117              西餐              西餐                        NaN   \n",
       "1  440117              披萨              披萨                13533792521   \n",
       "2  440117            西式快餐            西式快餐                        NaN   \n",
       "3  440117              西餐              西餐                        NaN   \n",
       "4  440117              牛排              牛排                        NaN   \n",
       "5  440117             泰国菜             泰国菜               020-37988888   \n",
       "6  440117            音乐餐厅            音乐餐厅                        NaN   \n",
       "7  440118              西餐              西餐  020-82822226;020-82826888   \n",
       "8  440117              西餐              西餐   020-87948399;13533993278   \n",
       "9  440117              西餐              西餐                        NaN   \n",
       "\n",
       "                                              photos business.business_area  \\\n",
       "0                                                NaN                    NaN   \n",
       "1                                                NaN                    NaN   \n",
       "2                                                NaN                    NaN   \n",
       "3  [{'title': '', 'url': 'http://store.is.autonav...                     温泉   \n",
       "4                                                NaN                    NaN   \n",
       "5  [{'title': '', 'url': 'http://store.is.autonav...                    NaN   \n",
       "6                                                NaN                    NaN   \n",
       "7  [{'title': '', 'url': 'http://store.is.autonav...                    NaN   \n",
       "8  [{'title': '', 'url': 'http://store.is.autonav...                     街口   \n",
       "9                                                NaN                     街口   \n",
       "\n",
       "  business.rating business.cost business.opentime_today business.opentime_week  \n",
       "0             NaN           NaN                     NaN                    NaN  \n",
       "1             NaN           NaN                     NaN                    NaN  \n",
       "2             NaN           NaN                     NaN                    NaN  \n",
       "3             4.1        145.00                     NaN                    NaN  \n",
       "4             2.6           NaN                     NaN                    NaN  \n",
       "5             4.3        217.00                     NaN                    NaN  \n",
       "6             NaN           NaN                     NaN                    NaN  \n",
       "7             4.1        163.00             11:00-24:00          全年11:00-24:00  \n",
       "8             4.3         35.00             10:00-24:00            10:00-24:00  \n",
       "9             NaN           NaN                     NaN                    NaN  \n",
       "\n",
       "[10 rows x 21 columns]"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['pois'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "f2e3c27e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2. 请求方法：GET\n",
    "# 3. 请求的搜索POI2.0地址：https://restapi.amap.com/v5/place/around?parameters\n",
    "POI2_url = \"https://restapi.amap.com/v5/place/around?parameters\"\n",
    "\n",
    "# 4. 请求的参数（payload）\n",
    "payload = {\n",
    "    \"key\":\"751cc256307b680656dd4f76d950ab80\",\n",
    "    \"keywords\":\"快餐厅\",\n",
    "    \"location\":\"113.678280,23.628439\",\n",
    "    \"show_fields\":\"photos,business\"\n",
    "}\n",
    "\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=POI2_url, params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "f574820d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "944b624f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'name': '初雪&韩式炸鸡(中大店)',\n",
       "   'id': 'B0HROCMQNF',\n",
       "   'location': '113.678227,23.628439',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇中山大学',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '小吃快餐', 'keytag': '小吃快餐', 'rating': '2.5'}},\n",
       "  {'name': '我家卖米粉(中大店)',\n",
       "   'id': 'B0HRO7MT5G',\n",
       "   'location': '113.678455,23.628393',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇中山大学南方学院后门润泰超市首层01-02号商铺',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '米粉', 'keytag': '米粉'}},\n",
       "  {'name': 'PROJECT.B美式汉堡(中大店)',\n",
       "   'id': 'B0HROCM4JK',\n",
       "   'location': '113.678983,23.627778',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'typecode': '050300',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇南方公寓',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '西式快餐', 'keytag': '西式快餐'}},\n",
       "  {'name': 'MC猪扒包(中大店)',\n",
       "   'id': 'B0HROCK4MH',\n",
       "   'location': '113.678983,23.627778',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇南方公寓',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '小吃快餐', 'keytag': '小吃快餐'}},\n",
       "  {'name': '港式住家饭(中大店)',\n",
       "   'id': 'B0H1M90UGD',\n",
       "   'location': '113.679504,23.628108',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇中山大学南方学院',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '香港菜', 'keytag': '香港菜'}},\n",
       "  {'name': '1号粥店',\n",
       "   'id': 'B0HROCMB8D',\n",
       "   'location': '113.679738,23.628307',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇中山大学南方学院',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '小吃快餐', 'keytag': '小吃快餐'}},\n",
       "  {'name': '巴老冒豆花冒菜(中大店)',\n",
       "   'id': 'B0HROCISXU',\n",
       "   'location': '113.679739,23.628221',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇中大南方',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '冒菜', 'keytag': '冒菜'}},\n",
       "  {'name': '十三幺熟食牛杂',\n",
       "   'id': 'B0G3ASF92M',\n",
       "   'location': '113.679565,23.627501',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'typecode': '050300',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇广州南方学院后门润泰超市1层05号商铺',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '熟食', 'keytag': '熟食'}},\n",
       "  {'name': '香辣螺蛳粉',\n",
       "   'id': 'B0FFKSF1FI',\n",
       "   'location': '113.676231,23.628565',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'typecode': '050300',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '广州南方学院西4123',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '螺蛳粉', 'keytag': '螺蛳粉'}},\n",
       "  {'name': '三米粥铺',\n",
       "   'id': 'B0HRO7N0SR',\n",
       "   'location': '113.680537,23.628612',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '从化区',\n",
       "   'address': '温泉镇中大南方',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440117',\n",
       "   'business': {'rectag': '小吃快餐', 'keytag': '小吃快餐'}}],\n",
       " 'count': '10'}"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "f84875ae",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>id</th>\n",
       "      <th>location</th>\n",
       "      <th>type</th>\n",
       "      <th>typecode</th>\n",
       "      <th>pname</th>\n",
       "      <th>cityname</th>\n",
       "      <th>adname</th>\n",
       "      <th>address</th>\n",
       "      <th>pcode</th>\n",
       "      <th>citycode</th>\n",
       "      <th>adcode</th>\n",
       "      <th>business.rectag</th>\n",
       "      <th>business.keytag</th>\n",
       "      <th>business.rating</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>初雪&amp;韩式炸鸡(中大店)</td>\n",
       "      <td>B0HROCMQNF</td>\n",
       "      <td>113.678227,23.628439</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇中山大学</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>小吃快餐</td>\n",
       "      <td>小吃快餐</td>\n",
       "      <td>2.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>我家卖米粉(中大店)</td>\n",
       "      <td>B0HRO7MT5G</td>\n",
       "      <td>113.678455,23.628393</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇中山大学南方学院后门润泰超市首层01-02号商铺</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>米粉</td>\n",
       "      <td>米粉</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>PROJECT.B美式汉堡(中大店)</td>\n",
       "      <td>B0HROCM4JK</td>\n",
       "      <td>113.678983,23.627778</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇南方公寓</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>西式快餐</td>\n",
       "      <td>西式快餐</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>MC猪扒包(中大店)</td>\n",
       "      <td>B0HROCK4MH</td>\n",
       "      <td>113.678983,23.627778</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇南方公寓</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>小吃快餐</td>\n",
       "      <td>小吃快餐</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>港式住家饭(中大店)</td>\n",
       "      <td>B0H1M90UGD</td>\n",
       "      <td>113.679504,23.628108</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇中山大学南方学院</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>香港菜</td>\n",
       "      <td>香港菜</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1号粥店</td>\n",
       "      <td>B0HROCMB8D</td>\n",
       "      <td>113.679738,23.628307</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇中山大学南方学院</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>小吃快餐</td>\n",
       "      <td>小吃快餐</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>巴老冒豆花冒菜(中大店)</td>\n",
       "      <td>B0HROCISXU</td>\n",
       "      <td>113.679739,23.628221</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇中大南方</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>冒菜</td>\n",
       "      <td>冒菜</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>十三幺熟食牛杂</td>\n",
       "      <td>B0G3ASF92M</td>\n",
       "      <td>113.679565,23.627501</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇广州南方学院后门润泰超市1层05号商铺</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>熟食</td>\n",
       "      <td>熟食</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>香辣螺蛳粉</td>\n",
       "      <td>B0FFKSF1FI</td>\n",
       "      <td>113.676231,23.628565</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>广州南方学院西4123</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>螺蛳粉</td>\n",
       "      <td>螺蛳粉</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>三米粥铺</td>\n",
       "      <td>B0HRO7N0SR</td>\n",
       "      <td>113.680537,23.628612</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>从化区</td>\n",
       "      <td>温泉镇中大南方</td>\n",
       "      <td>440000</td>\n",
       "      <td>020</td>\n",
       "      <td>440117</td>\n",
       "      <td>小吃快餐</td>\n",
       "      <td>小吃快餐</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 name          id              location              type  \\\n",
       "0        初雪&韩式炸鸡(中大店)  B0HROCMQNF  113.678227,23.628439  餐饮服务;餐饮相关场所;餐饮相关   \n",
       "1          我家卖米粉(中大店)  B0HRO7MT5G  113.678455,23.628393      餐饮服务;中餐厅;中餐厅   \n",
       "2  PROJECT.B美式汉堡(中大店)  B0HROCM4JK  113.678983,23.627778      餐饮服务;快餐厅;快餐厅   \n",
       "3          MC猪扒包(中大店)  B0HROCK4MH  113.678983,23.627778  餐饮服务;餐饮相关场所;餐饮相关   \n",
       "4          港式住家饭(中大店)  B0H1M90UGD  113.679504,23.628108      餐饮服务;中餐厅;中餐厅   \n",
       "5                1号粥店  B0HROCMB8D  113.679738,23.628307      餐饮服务;中餐厅;中餐厅   \n",
       "6        巴老冒豆花冒菜(中大店)  B0HROCISXU  113.679739,23.628221      餐饮服务;中餐厅;中餐厅   \n",
       "7             十三幺熟食牛杂  B0G3ASF92M  113.679565,23.627501      餐饮服务;快餐厅;快餐厅   \n",
       "8               香辣螺蛳粉  B0FFKSF1FI  113.676231,23.628565      餐饮服务;快餐厅;快餐厅   \n",
       "9                三米粥铺  B0HRO7N0SR  113.680537,23.628612  餐饮服务;餐饮相关场所;餐饮相关   \n",
       "\n",
       "  typecode pname cityname adname                      address   pcode  \\\n",
       "0   050000   广东省      广州市    从化区                      温泉镇中山大学  440000   \n",
       "1   050100   广东省      广州市    从化区  温泉镇中山大学南方学院后门润泰超市首层01-02号商铺  440000   \n",
       "2   050300   广东省      广州市    从化区                      温泉镇南方公寓  440000   \n",
       "3   050000   广东省      广州市    从化区                      温泉镇南方公寓  440000   \n",
       "4   050100   广东省      广州市    从化区                  温泉镇中山大学南方学院  440000   \n",
       "5   050100   广东省      广州市    从化区                  温泉镇中山大学南方学院  440000   \n",
       "6   050100   广东省      广州市    从化区                      温泉镇中大南方  440000   \n",
       "7   050300   广东省      广州市    从化区       温泉镇广州南方学院后门润泰超市1层05号商铺  440000   \n",
       "8   050300   广东省      广州市    从化区                  广州南方学院西4123  440000   \n",
       "9   050000   广东省      广州市    从化区                      温泉镇中大南方  440000   \n",
       "\n",
       "  citycode  adcode business.rectag business.keytag business.rating  \n",
       "0      020  440117            小吃快餐            小吃快餐             2.5  \n",
       "1      020  440117              米粉              米粉             NaN  \n",
       "2      020  440117            西式快餐            西式快餐             NaN  \n",
       "3      020  440117            小吃快餐            小吃快餐             NaN  \n",
       "4      020  440117             香港菜             香港菜             NaN  \n",
       "5      020  440117            小吃快餐            小吃快餐             NaN  \n",
       "6      020  440117              冒菜              冒菜             NaN  \n",
       "7      020  440117              熟食              熟食             NaN  \n",
       "8      020  440117             螺蛳粉             螺蛳粉             NaN  \n",
       "9      020  440117            小吃快餐            小吃快餐             NaN  "
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['pois'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "c81a22f8",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 天选之饭--周边--(中餐厅、外国餐厅、快餐厅、休闲餐厅)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8aecddd0",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "hide_input": false,
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
